import java.util.Calendar;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        boolean flag = true;
        Running running = new Running();
        Calendar TmpCalendar = Calendar.getInstance();

        Calendar now = Calendar.getInstance();
        int nowday = now.get(Calendar.DAY_OF_MONTH);
        int nowmonth = now.get(Calendar.MONTH)+1;
        int nowyear = now.get(Calendar.YEAR);
        //现在时间
        Calendar day1 = Calendar.getInstance();
        day1.set(2000, 11, 16);
        int day1day = day1.get(Calendar.DAY_OF_MONTH);
        int day1month = day1.get(Calendar.MONTH);
        int day1year = day1.get(Calendar.YEAR);
        int day1dayear = day1.get(Calendar.DAY_OF_YEAR);
        //批准办校
        Calendar day2 = Calendar.getInstance();
        day2.set(2006, 04, 01);
        int day2day = day2.get(Calendar.DAY_OF_MONTH);
        int day2month = day2.get(Calendar.MONTH);
        int day2year = day2.get(Calendar.YEAR);
        //升格为独立学院
        Calendar day3 = Calendar.getInstance();
        day3.set(2011, 11, 01);
        int day3day = day3.get(Calendar.DAY_OF_MONTH);
        int day3month = day3.get(Calendar.MONTH)+1;
        int day3year = day3.get(Calendar.YEAR);
        //通过学士学位评估
        Calendar day4 = Calendar.getInstance();
        day4.set(2020, 06, 30);
        int day4day = day4.get(Calendar.DAY_OF_MONTH);
        int day4month = day4.get(Calendar.MONTH);
        int day4year = day4.get(Calendar.YEAR);
        //转设为广州理工学院
        Calendar day5 = Calendar.getInstance();
        day5.set(2021, 01, 01);
        int day5day = day5.get(Calendar.DAY_OF_MONTH);
        int day5month = day5.get(Calendar.MONTH);
        int day5year = day5.get(Calendar.YEAR);
        //入列首批硕士学位立项建设单位
        Calendar day6 = Calendar.getInstance();
        day6.set(2022, 01, 01);
        int day6day = day6.get(Calendar.DAY_OF_MONTH);
        int day6month = day6.get(Calendar.MONTH);
        int day6year = day6.get(Calendar.YEAR);
        //收首届联合培养研究生

        int day1tmp = running.tmp(nowyear, day1year, now.get(Calendar.DAY_OF_YEAR), day1.get(Calendar.DAY_OF_YEAR));
        int day2tmp = running.tmp(nowyear, day2year, now.get(Calendar.DAY_OF_YEAR), day2.get(Calendar.DAY_OF_YEAR));
        int day3tmp = running.tmp(nowyear, day3year, now.get(Calendar.DAY_OF_YEAR), day3.get(Calendar.DAY_OF_YEAR));
        int day4tmp = running.tmp(nowyear, day4year, now.get(Calendar.DAY_OF_YEAR), day4.get(Calendar.DAY_OF_YEAR));
        int day5tmp = running.tmp(nowyear, day5year, now.get(Calendar.DAY_OF_YEAR), day5.get(Calendar.DAY_OF_YEAR));
        int day6tmp = running.tmp(nowyear, day6year, now.get(Calendar.DAY_OF_YEAR), day6.get(Calendar.DAY_OF_YEAR));
        //计算差值


        System.out.println("今天是" + nowyear + "年" + nowmonth + "月" + nowday + "日");
        System.out.println("GZIST编年史");
        System.out.println("我校于" + day1year + "年" + day1month + "月" + "被教育部批准创办,距离今天"+day1tmp+"天");
        System.out.println("我校于" + day2year + "年" + day2month + "月" + "经教育部批准升格为独立学院,距离今天"+day2tmp+"天");
        System.out.println("我校于" + day3year + "年" + day3month + "月" + "通过学士学位评估,距离今天"+day3tmp+"天");
        System.out.println("我校于" + day4year + "年" + day4month + "月" + day4day + "日" + "经教育部同意转设为广州理工学院,成为独立设置的普通本科高校,距离今天"+day4tmp+"天");
        System.out.println("我校于" + day5year + "年"+ "入列广东省民办本科高校首批硕士学位授予立项建设单位,距离今天"+day5tmp+"天");
        System.out.println("我校于" + day6year + "年"+ "入列广东省民办本科高校首批联合培养硕士研究生招生单位并招收首届联合培养研究生,距离今天"+day6tmp+"天");
//        System.out.println("我校是广东省同时具有省科技厅、省教育厅、省人社厅、省社科联命名科研平台的民办本科高校");
        //基础输出完毕
//        System.out.println("day1相差"+day1tmp+"天");
//        System.out.println("day2相差"+day2tmp+"天");
//        System.out.println("day3相差"+day3tmp+"天");
//        System.out.println("day4相差"+day4tmp+"天");
//        System.out.println("day5相差"+day5tmp+"天");
//        System.out.println("day6相差"+day6tmp+"天");
        do {
            System.out.println("请选择你想要进行的操作");
            System.out.println("1:几天后");
            System.out.println("2:几月后");
            System.out.println("3:几年后");
            System.out.println("4:自定义输入");
            System.out.println("0:退出");
            Scanner scanner = new Scanner(System.in);
            int tmp = scanner.nextInt();
            switch (tmp){
                case 1:
                    System.out.printf("请输入：");
                    int calendarday = running.day();
                    TmpCalendar.add(Calendar.DAY_OF_MONTH,calendarday);
                    int tmpdayear = TmpCalendar.get(Calendar.DAY_OF_YEAR);
                    if (tmpdayear == day1dayear){
                        System.out.println("今天为day1纪念日"+(now.get(Calendar.YEAR)-day1year)+"周年");
                    }
                    System.out.println("day1相差"+(day1tmp+calendarday)+"天");
                    System.out.println("day2相差"+(day2tmp+calendarday)+"天");
                    System.out.println("day3相差"+(day3tmp+calendarday)+"天");
                    System.out.println("day4相差"+(day4tmp+calendarday)+"天");
                    System.out.println("day5相差"+(day5tmp+calendarday)+"天");
                    System.out.println("day6相差"+(day6tmp+calendarday)+"天");
                    break;
                case 2:
                    System.out.printf("请输入：");
                    int calendarmonth = running.month();
                    System.out.println("day1相差"+(day1tmp+calendarmonth)+"天");
                    System.out.println("day2相差"+(day2tmp+calendarmonth)+"天");
                    System.out.println("day3相差"+(day3tmp+calendarmonth)+"天");
                    System.out.println("day4相差"+(day4tmp+calendarmonth)+"天");
                    System.out.println("day5相差"+(day5tmp+calendarmonth)+"天");
                    System.out.println("day6相差"+(day6tmp+calendarmonth)+"天");
                    break;
                case 3:
                    System.out.printf("请输入：");
                    int calendaryear = running.year();
                    System.out.println("day1相差"+(day1tmp+calendaryear)+"天");
                    System.out.println("day2相差"+(day2tmp+calendaryear)+"天");
                    System.out.println("day3相差"+(day3tmp+calendaryear)+"天");
                    System.out.println("day4相差"+(day4tmp+calendaryear)+"天");
                    System.out.println("day5相差"+(day5tmp+calendaryear)+"天");
                    System.out.println("day6相差"+(day6tmp+calendaryear)+"天");
                    break;
                case 4:
                    System.out.printf("请输入：");
                    break;
                case 0:
                    System.exit(0);
                    break;
                default:
                    System.out.println("输入有误，请重新输入");
                    break;
            }
        }while(flag);


        Calendar tmp = Calendar.getInstance();
        Scanner scanner = new Scanner(System.in);
        tmp.add(Calendar.DAY_OF_MONTH,scanner.nextInt());
    }
}

class Running {
    int tmp(int nowyear, int dayyear, int nowday, int dayday) {
//        System.out.println(nowyear+","+dayyear+","+nowday+","+dayday);
        int tmp = (nowyear - dayyear) * 365 + nowday - dayday;
        return tmp;
    }
    int day(){
        Scanner scanner = new Scanner(System.in);
        int number = scanner.nextInt();
        System.out.println("您输入了"+number+"天后");
        return number;
    }
    int month(){
        Scanner scanner = new Scanner(System.in);
        int number = scanner.nextInt();
        System.out.println("您输入了"+number+"月后");
        int tmp = number * 30;
        return tmp;
    }
    int year(){
        Scanner scanner = new Scanner(System.in);
        int number = scanner.nextInt();
        System.out.println("您输入了"+number+"年后");
        int tmp = number * 365;
        return tmp;
    }
}
